﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Data;
using DBUtility;
using MyExection;

namespace SecurityDAL
{
    /// <summary>
    /// 导航菜单节点数据访问层
    /// </summary>
    public class CaiDanJieDianDAL
    {
        private readonly string ConnStr = ConfigurationManager.AppSettings["ERPDataConnStr"];

        public CaiDanJieDianDAL()
        {
        }
        /// <summary>
        /// 获取菜单节点
        /// </summary>
        /// <returns></returns>
        public DataTable GetCaiDanJieDian()
        {
            DataTable searchDT = new DataTable();
            StringBuilder sbSql = new StringBuilder();
            sbSql.Append(" SELECT *  ");
            sbSql.Append(" FROM TB_CaiDanJieDian  where cd_shifouyouxiao=1");
            try
            {
                searchDT = DBSQLHelper.GetDataTable(ConnStr, CommandType.Text, sbSql.ToString(), null);
            }
            catch (Exception e)
            {
                throw new CustomException(e.Message, "CaiDanJieDianDAL.GetCaiDanJieDian()", "获取菜单节点");
            }
            return searchDT;
        }
    }
}
